//
//  DeletedMyChartingView.m
//  intelligent
//
//  Created by 甘世清 on 2024/3/3.
//

#import "DeletedMyChartingView.h"

@implementation DeletedMyChartingView

- (void)SQ_UIViewForSelfView{
    UIView * bgView = [[UIView alloc]init];
    
    bgView.backgroundColor = UIColor.whiteColor;
    bgView.layer.cornerRadius = 16;
    bgView.layer.masksToBounds = YES;
    bgView.clipsToBounds = YES;
    [self addSubview:bgView];
    [bgView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.centerY.equalTo(self);
        make.width.mas_equalTo(SCREEN_WIDETH-55);
        make.height.mas_equalTo(134);
    }];
    UIImageView * image = [[UIImageView alloc]init];
    image.image = SQGetImage(@"垃圾桶");
    image.backgroundColor = UIColor.clearColor;
    image.contentMode = UIViewContentModeScaleAspectFit;
    [self addSubview:image];
    [image mas_makeConstraints:^(MASConstraintMaker *make) {
            make.width.mas_equalTo(88);
            make.height.mas_equalTo(66);
            make.centerX.equalTo(self);
           make.bottom.equalTo(bgView.mas_top).offset(30);
    }];
    
    UILabel * label=[[UILabel alloc]init];
    label.text = SQNSLocalString(@"是否删除照片");
    label.font = FONT_MEDIUM(16);
    label.textColor = SQColor333333;
    [image addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(image);
            make.top.equalTo(image.mas_bottom).offset(25);
    }];
    
    [self addSubview:self.leftBtn];
    [self addSubview:self.rightBtn];
    [self.leftBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_equalTo(140);
        make.height.mas_equalTo(48);
        make.top.equalTo(bgView.mas_bottom).offset(16);
        make.left.equalTo(bgView).offset(12);
    }];
    [self.rightBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_equalTo(140);
        make.height.mas_equalTo(48);
        make.top.equalTo(bgView.mas_bottom).offset(16);
        make.right.equalTo(bgView.mas_right).offset(-12);
    }];
}

- (SQCustomButton *)leftBtn{
    if (!_leftBtn) {
        _leftBtn = [[SQCustomButton alloc]initType:SQCustomButtonTopImageType imageSize:CGSizeMake(0, 0) midmargin:0];
        _leftBtn.text = SQNSLocalString(@"取消");
        _leftBtn.textColor = SQColor333333;
        _leftBtn.font = FONT_MEDIUM(16);
        _leftBtn.layer.cornerRadius = 24;
        _leftBtn.backgroundColor = SQColor(@"#4AF8CE");
    }
    return _leftBtn;
}
- (SQCustomButton *)rightBtn{
    if (!_rightBtn) {
        _rightBtn = [[SQCustomButton alloc]initType:SQCustomButtonTopImageType imageSize:CGSizeMake(0, 0) midmargin:0];
        _rightBtn.text = SQNSLocalString(@"删除");
        _rightBtn.textColor = SQColor333333;
        _rightBtn.font = FONT_MEDIUM(16);
        _rightBtn.layer.cornerRadius = 24;
        _rightBtn.backgroundColor = SQColor(@"#E8E8E8");
    }
    return _rightBtn;
}
@end
